home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr39 / bpq406f.zip / DRIVERS.DOC < prev    next >
Text File  |  1993-04-25  |  19KB  |  552 lines

  1.             G8BPQ Switch Driver Programs.
  2.  
  3.  
  4. This file documents the driver programs provided with the switch. They fall
  5. into two categories, programs to interface to external hardware not supported
  6. directly by the switch, and programs to interface application software to
  7. the switch.
  8.  
  9. Hardware Drivers.
  10.  
  11. These programs use the EXTERNAL port interface (see EXTERNAL.DOC). This 
  12. interface was provided primarily to allow users to write their own hardware
  13. drivers, but I have started to use it to support hardware which is likely to
  14. be only of minority interest, so dont justify occupying memory unless required.
  15. So far there is only one driver in this category.
  16.  
  17. ODIDRV
  18.  
  19. This program allows switches to be linked via Ethernet. The software runs
  20. over the Novell ODI interface, so should work with any Ethernet card for
  21. which an ODI driver is available.
  22.  
  23.  
  24. Application Software Drivers.
  25.  
  26. From Version 4.00, the application interface to the switch has been changed.
  27. The new interface is called BPQ Host Mode (see BPQHOST.DOC for full details).
  28. Some software is available for the new interface (eg F6FBB BBS, TERM4), but,
  29. in order to support older software, and to provide new facilities, a number
  30. of drivers have been written. These are TSR's, which are loaded after BPQCODE.
  31.  
  32. The drivers supplied with 4.06 are detailed below:
  33.  
  34. BPQHTNC2
  35.  
  36. This provides the COMBIOS/TNC2 emulation, as used by W0RLI and G1NNA
  37. BBS's (amongst others), and various Terminal Programs (YAPPB, PAC2 etc).
  38.  
  39.  
  40. BPQHKISS
  41.  
  42. This provides the COMBIOS/KISS emulation. This was used for the NET
  43. TCP/IP interface, and for programs like STATS and TLMDC (the Satellite
  44. telemetry decode program). 
  45.  
  46.  
  47. DEDHOST
  48.  
  49. This provides an emulation of the WA8DED Host Mode driver used with DRSI
  50. cards (TNCTSR). It is used for PacketCluster and AA4RE BBS.
  51.  
  52.  
  53. NODEDRV4
  54.  
  55. This is used to interface the NOS TCP/IP package to the switch. It conforms
  56. to the PacketDriver interface spec.
  57.  
  58.  
  59.  
  60. Full details of the above drivers are given below:
  61.  
  62.  
  63.  
  64.         ODIDRV - Ethernet Interface
  65.  
  66.  
  67. This driver allows two or more switches to be linked via Ethernet. The driver
  68. uses the ODI system to interface to the ethernet card. A working knowledge
  69. of ODI is assumed in this document. 
  70.  
  71. The driver has one parameter, the software interrupt to be used by the
  72. switch to communicate with the driver. This must match the INTLEVEL param
  73. in BPQCFG.TXT. The number is specified in decimal in both places:
  74.  
  75.     ODIDRV 125
  76.  
  77. By default, the system uses a multicast address of 01:42:50:51:0:0, and
  78. I recommend the use of ETHERNET_II frame type, and PID=08FF. These can
  79. all be overridden by parameters in NET.CFG
  80.  
  81.     NET.CFG Params:
  82.  
  83. LINK SUPPORT
  84.  
  85.     MAX STACKS 4
  86.     MAX BOARDS 4
  87.     
  88. LINK DRIVER NE1000            ; or other MLID to suit your card
  89.  
  90.      INT 2                ;
  91.      PORT 300                ; to suit your card
  92.  
  93.      FRAME ETHERNET_802.2        ; may not need all these    
  94.      FRAME ETHERNET_II    
  95.      FRAME ETHERNET_802.3
  96.      FRAME ETHERNET_SNAP
  97.     
  98.      PROTOCOL IPX 0 ETHERNET_802.3    ; if you want to use Netware as well
  99.  
  100.      PROTOCOL BPQ 8FF ETHERNET_II    ; required for BPQ - can change PID 
  101.  
  102. BPQPARAMS                ; optional - only needed if you want
  103.                     ; to override the default target addr
  104.  
  105.     ETH_ADDR  00:80:C7:4A:97:03    ; Target address. See below 
  106.  
  107.  
  108.  
  109. By default, the system uses multicasts. This simplifies configuration, and
  110. allows several nodes to communicate. If you only have two nodes you can
  111. improve efficiency marginally by specifying the hardware address of the
  112. other ethernet card. You can also specify the broadcast address 
  113. (ff:ff:ff:ff:ff:ff). This may be necessary if your MLID doesnt support
  114. multicast.
  115.  
  116. I havnt found any problem using a PID of 8FF, but you can change this if
  117. necessary. 
  118.  
  119.  
  120.  
  121.  
  122.         TNC2 Emulation routine - BPQHTNC2
  123.  
  124.  
  125. This program provides the application interface for TNC2 applications
  126. on switch version 4.05 and above. BPQHTNC2 should be loaded after the switch.
  127. If only a single program uses the TNC2 interface, (eg NNA), it may be loaded
  128. in the programs's Desqview window, but if it is used by more than
  129. one program (eg RLI, or utilites such as PAC2, BPQTERM, MH), it should be
  130. laoded before Desqview. If in doubt, load it before DV.
  131.  
  132. The program may be called in two ways. If called without any paramters, it
  133. will use the TNCPORT information from BPQCFG.BIN, and use BPQHOST ports 33
  134. upwards. This should be adequate for the great majority of applications.
  135. Alternatively it is possible to supply 3 parameters, the number of TNC2 ports
  136. required, the first COMBIOS port required, and the first BPQHost port to use.
  137. This will only be necessary if you want to use more than 16 TNCPORTS, or if
  138. you are already using BPQHOST ports above 33.
  139.  
  140. For example,
  141.  
  142. To use the ports defined in BPQCFG.TXT (ie to be the same as earlier versions)
  143.  
  144.     BPQHTNC2
  145.  
  146. To create COM1-COM18, enter:
  147.  
  148.     BPQHTNC2 18 1 1
  149.  
  150. For COM2-COM5
  151.  
  152.     BPQHTNC2 4 2 1
  153.  
  154. A single copy of BPQHTNC2 can only support a contiguous set of COM ports. If
  155. you want set up say COM1-COM4, then COM8-COM9, you can run more than one 
  156. copy:
  157.  
  158.     BPQHTNC2 4 1 1
  159.     BPQHTNC2 2 8 5        (Four BPQHOST ports have been used by first)
  160.  
  161. There is some overhead in running two copies, so in general it would be
  162. better to rearrange the applications to use a contiguous set of COM ports.
  163.  
  164.  
  165. The last parameter will normally be 1. Only if you are using BPQ Host ports
  166. for other software (eg FBB, TERM4, DEDHOST), or are running more than one copy
  167. of BPQHTNC2, will it need changing.
  168.  
  169.  
  170. Please note that BPQHTNC2 reads BPQCFG.BIN to find what interrupt to use 
  171. to talk to the switch, and to get the default value for PACLEN. BPQCFG.BIN
  172. must therefore be in the current directory when BPQHTNC2 is loaded.
  173.  
  174. The following commands are supported by BPQHTNC2:
  175.  
  176. CONOK ON/OFF    - Indicates the port is available for use. By default, it
  177.           will be for the BBS application. See APPL comand.
  178.  
  179.  
  180. APPL        - Bit significant field, to indicate which application the
  181.           port is supporting. The first three are reserved for BBS,
  182.           connects to the SYSOP (HOST support), and remote SYSOP
  183.           facilities. The other 5 are available for you to define your
  184.           own application servers (eg DATABASE, UNIX gateway).
  185.           Default is 01, the BBS.
  186.  
  187.           To allow users to connect to you (using the C command 
  188.           from the switch without a param), set APPL=02, and CONOK ON
  189.  
  190.  
  191. BBSMON ON/OFF    - Reduces the monitor output to calls only (enough to maintain
  192.           the JA list). Place in the MBL config file startup section.
  193.  
  194. MTX ON/OFF    - Monitors transmitted frames - mainly used for debugging
  195.  
  196. MONITOR ON/OFF    - As in normal TNC
  197. MALL ON/OFF
  198. MCOM ON/OFF
  199. MCON ON/OFF       Note that to monitor whilst connected to the Node, you 
  200.           need MCON ON 
  201.  
  202. MMASK         - Selects which (radio) ports will be monitored. A bit
  203.           significant field - setting bit 0 allows monitoring of 
  204.           the first port, bit 1 the second, and so on. Default is
  205.           hex FF, monitoring all radio ports. Setting it to zero
  206.           will suppress all monitoring.
  207.  
  208. The monitor code will decode and display the network headers from messages
  209. between nodes. This enables you to see what routes are being used between
  210. nodes, as well as removing a lot of garbage from the monitor display!
  211.  
  212.  
  213. NOMODE ON/OFF    The next 2 are accepted, but are not fully implemented. In 
  214. NEWMODE ON/OFF  general BBS connects assume NOMODE on, others NOMODE off.
  215.  
  216. CONNECT
  217.  
  218. To connect to the node, use the command NODE (or K). This is equivalent to
  219. connecting to a normal node. There is a (roughly) equivalent command
  220. C SWITCH, which returns the string *** CONNECTED to SWITCH, and is used
  221. in MBL forward files, as the MBL software is expecting the first connect
  222. to be at Level 2. A Connect command without a parameter returns the
  223. current state, again mainly for use by MBL software. A connect with any other
  224. parameter connects to the Node, then passes the command to the Node's command
  225. processor, thus allowing you to enter a normal Connect from either TNC or NODE
  226. command level.
  227.  
  228. CONV
  229. TRANS 
  230. UNPROTO CALL [VIA CALL ...]
  231. BTEXT
  232.  
  233. The CONV and TRANS command enter the appropriate state, and if not connected
  234. to the Node, allow you to send UI frames. This is used for the MBL 'Mail for
  235. xxxx' broadcasts, and can be used for CQ's , etc. Beaconing is not supported,
  236. but the BTEXT text is saved, and may be send instead of the predefined ID
  237. message at intervals. This is primarily for RLI 'MAIL' beacons.
  238.  
  239.  
  240. Note that K is an abbreviation for NODE, not CONV, as in a normal TNC, as 
  241. normally you want to switch easily between TNC command and Node command modes.
  242.  
  243. SENDPAC
  244. CPACTIME    
  245. CR        - As normal TNC.
  246.  
  247. FLOW ON/OFF    - Similar to normal TNC, but a bit simpler. in particular
  248.           echoing is suppressed, so if you need to use FLOW ON, I
  249.           suggest you set ECHO OFF
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. Background information on INT14 Drivers.
  257.  
  258.  
  259. Both BPQHTNC2 and BPQHKISS emulate the COMBIOS/MBBIOS interface used by
  260. WA7MBL, AA4RE and others.
  261.  
  262. The following contains information extracted from AA4RE's MBBIOS
  263. Documentation. It has been modified to conform to my COMBIOS
  264. emulation.
  265.  
  266. MBBIOS supports the standard INT 14 calls plus the extended ones as
  267. defined by Jeff Jacobsen, WA7MBL for his BBS program.  These are
  268. explained below.  AH=0 to AH=3 are identical to the IBM BIOS definition.
  269.  
  270. DX must contain the port number, which start at zero, so for COM1 set 
  271. DX=0, COM2 set DX=1, etc.
  272.  
  273.  
  274. AH = 0     Initialize
  275. ---------------------
  276.  
  277. This is provided for compatibility only. It has no effect except to
  278. return the current (virtual) LSR in AH, bit zero of which is set if
  279. any characters remain in the rx buffer, and virtual MSR in AL. 
  280.  
  281.  
  282.     The MSR bits supported are DCD=Connected
  283.                    CTS=Not busy
  284.  
  285.     An attempt is also made to maintain delta bits
  286.  
  287.          BIT 7 - Receive Line Signal Detect (DCD)
  288.          6 - Ring Indicator (Not supported) 
  289.              5 - Data Set Ready (Always on)
  290.              4 - Clear To Send
  291.  
  292.              3 - Delta  RLSD ( ie state has changed since last
  293.                                   access)
  294.              2 - Not Supported (Trailing Edge Ring Detect)
  295.              1 - Not Supported (Delta DSR)
  296.              0 - Delta CTS
  297.  
  298.  
  299. AH = 1     Send Character
  300. -------------------------
  301.  
  302. AL contains the character to send.  Return values are the same as above.
  303.  
  304.  
  305. AH = 2     Receive Character
  306. ----------------------------
  307.  
  308. On return, AL contains the character received.  AH contains the
  309. virtual LSR. Again, AH bit 0 indicates if there is additional characters 
  310. in the buffer.  This routine does NOT timeout while waiting for a character 
  311. but will hang indefinitely waiting for a character to appear.
  312.  
  313. AH = 3     Return Status
  314. ------------------------
  315.  
  316. Return values are the same as returned by the Initialize routine.
  317.  
  318. AH = 4     Inquiry
  319. ------------------
  320.  
  321. Returns AX and BX set to 0AA55H.  This call is used to see if the
  322. particular port is defined in TNCPORTLIST. Note that COMBIOS/MBBIOS
  323. set AX, but not BX
  324.  
  325.  
  326. AH = 5     Drop RTS
  327. -------------------
  328.  
  329. This drops (virtual) DTR and RTS.  Will stop higher level code sending
  330. any more data into the receive buffer. No return value.
  331.  
  332. AH = 6     Raise RTS
  333. --------------------
  334.  
  335. Raise DTR and RTS.  No return value.
  336.  
  337. AH = 7     Send Break
  338. ---------------------
  339.  
  340. Generates a "Break".  Returns the virtual TNC to Command mode from Converse
  341. or Transparent mode. No return value.
  342.  
  343. AH = 8     Non-destructive Read
  344. -------------------------------
  345.  
  346. Returns the next character in the buffer in AL without removing it from
  347. the buffer.  AH value defined as in AH=2 so you can use the Data Ready
  348. bit to check to see if you really did get a character.
  349.  
  350. AH = 9     Set/Get options
  351. --------------------------
  352.  
  353. Not implemented.
  354.  
  355.  
  356.  
  357. AH = A     Write buffer
  358. -----------------------
  359.  
  360. Sends CX characters starting at DI:ES.  Upon return, DI will be updated
  361. and CX will contain the unsent character count.  Unsent characters could
  362. result from either BUFFER FULL or hardware handshake is OFF.  AX will
  363. be set as in AH=3 (Status) above.
  364.  
  365. AH = B     Read buffer
  366. ------------------
  367.  
  368. Receives up to CX characters starting at DI:ES.  Upon return, CX set to
  369. actual count read and DI is updated.  If the buffer is empty, return is
  370. immediate with CX = 0. The function will return a 'logical' line, up
  371. to a CR in normal mode, or 17H in Host Mode. On return, AL contains the MSR
  372. and AH has the virtual LSR. Again, AH bit 0 indicates if there are additional 
  373. characters in the buffer.
  374.  
  375.  
  376.  
  377. AH = 1F - G8BPQ NODE-SPECIFIC COMBIOS EXTENTIONS 
  378. ------------------------------------------------
  379.  
  380. AL = 0 - Return Version and Node DS
  381.  
  382. Returns: AX=Node data segment
  383.      DH=Major Version
  384.      DL=Minor Version    - ie for version 3.50, DH=3, DL=50
  385.  
  386.  
  387. AL = 1 - Return ES:SI pointing to connected call (in AX25 firm), or
  388.        SI=0 if not connected. If connected, returns session type 
  389.        in AH, and port number (if L2 session) in AL. Session
  390.        type is a bit significant field defined as follows:
  391.  
  392.        ;
  393.        ;    CIRCUITTYPE EQUATES
  394.         ;
  395.        L2LINK    EQU    1
  396.        SESSION    EQU    10B
  397.        UPLINK    EQU    100B
  398.        DOWNLINK    EQU    1000B
  399.        HOST        EQU    10000B
  400.     
  401.  
  402. AL = 2  Return (in AH) number of unacked packets on connection.
  403.     Some versions (pre-4.05f) incorrectly returned the value
  404.     in AL instead of AH. To maintain compatibility with software
  405.     written to allow for this, the value is now returned in AL
  406.     as well as AH.
  407.  
  408. AL = 3  (Versions 4.05f and later)
  409.     Set PACLEN to the value recommended by the node. This will
  410.     initially be derived from the type of connect (ie L2 or L4),
  411.     and the port used (if L2). Eventually it will be varied to
  412.     optimise throughput, based on link performance.
  413.  
  414. AL = 10H Disconnect user form virtual TNC, and return user to Node
  415.  
  416.  
  417. The segment registers are saved, (unless retuning a value), but other 
  418. registers may be destroyed.
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.         WA8DED Host Mode Interface for G8BPQ Switch.
  426.  
  427.  
  428.  
  429. A facility has been developed to allow applications which normaly operate
  430. in DED Host Mode, using a DRSI card and the DRSI support routine TNCTSR,
  431. to be used with my switch code. An external interface routine DEDHOST.COM
  432. is used to emulate the DRSI support routine TNCTSR. DEDHOST must be run after
  433. BPQCODE. If running with Desqview, DEDHOST should be run in the same window
  434. as the application. Version 4.01 (or higher) of BPQCODE is required. Note that
  435. my code emulates a single DSRI port - multiple comms links may be connected to
  436. the switch, but as far as the application software is concerned, there is a
  437. single (virtual) link to the switch, capable of supporting up to 32 sessions.
  438.  
  439. DEDHOST.COM requires 5 parameters, all are decimal numbers. A 6th is optional
  440. - if present, it is a single character. Parameters are:
  441.  
  442. Number of Streams.
  443.  
  444. This defines the maximum number of simultaneous users. The maximum is 32. 
  445.  
  446. Start Stream.
  447.  
  448. The first stream number to use. The switch supports 64 streams. You must
  449. ensure that each application running with the switch uses a different range
  450. of streams. 
  451.  
  452.  
  453. Application.
  454.  
  455. The number allocated to this application in the APPLICATIONS param of
  456. BPQCFG.TXT. Will normally be 1 if running a BBS or similar system.
  457.  
  458. Buffer Space.
  459.  
  460. The space to be allocated for buffering messages. You can specify up to 60
  461. (Kilobytes). The program will allocate a minimum of 8k even if you specify
  462. less. The space needed will depend on your traffic, and the software you are
  463. using. I suggest you allocate as much as you can spare. If the application
  464. then runs short of memory, you will have to experiment to find the optimum
  465. value for your installation.
  466.  
  467. Interrupt Number.
  468.  
  469. The Interrupt used by the application to communicate with DEDHOST. Will be
  470. 255, unless you need to use that for some other software.
  471.  
  472.  
  473. Autotimer Flag.
  474.  
  475. Normally the driver is configured to request the switch to send a message
  476. after 11 minutes without activity on each stream. This is so that
  477. PacketCluster users may remain connected during perions of low activity. If
  478. you dont want this facility, or are not using Packetcluster, set parameter to
  479. 'N'. If you omit the parameter, or enter any other value, it will be enabled.
  480.  
  481.  
  482.         A typical command line would be DEDHOST 32 1 1 60 255 Y
  483.  
  484. Please note that DEDHOST reads BPQCFG.BIN to find what interrupt to use 
  485. to talk to the switch. BPQCFG.BIN must therefore be in the current directory
  486. when DEDHOST is loaded.
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.                    NOS/BPQ Link - NODEDRV4.COM
  495.  
  496.  
  497. The 'Packet Driver' I wrote to allow NOS to communicate with the switch
  498. has been modified to use the BPQ Host mode interface. One copy of the
  499. packet driver is needed for each radio port to be used by NOS, plus one
  500. for the loopback port if you want NOS to be able to talk to the switch.
  501. I dont have a lot of experience of using NOS, but I suggest that if you
  502. are using TCP/IP over NETROM that you use the lookback port, and let the
  503. switch handle all the radio links. Only if you are using IP in datagram
  504. or ax.25 virtual circuit mode will you need to give NOS direct access to
  505. the radio ports.
  506.  
  507. Please note that you need at least version 4.03 of BPQCODE.EXE
  508.  
  509. The following is an extract from my system. You will need to tailor
  510. it to your own requirements.
  511.  
  512.  
  513. If using Desqview, NODEDRV4 must be loaded in the same window as NOS -
  514. if you put it under desqview the system will probably crash. It takes
  515. three parameters, the software interrupt number used by NOS to communicate
  516. with it (in the range 60-7f hex), the BPQ Host port to use to talk to the
  517. switch (1 - 63), and the number of the radio port to be accessed.
  518.  
  519.  
  520. Please note that NODEDRV4 reads BPQCFG.BIN to find what interrupt to use 
  521. to talk to the switch. BPQCFG.BIN must therefore be in the current directory
  522. when NODEDRV4 is loaded.
  523.  
  524.  
  525. STARTNOS.BAT
  526.  
  527.  
  528. nodedrv4 0x61 33 1         I am using BPQHost ports 33-35, as I use   
  529. nodedrv4 0x62 34 2        the first 32 for a PacketCluster Node. 
  530. nodedrv4 0x63 35 3        I have given NOS access to 2 radio ports,
  531. nos                and a loopback port to the switch.
  532.  
  533.  
  534.  
  535. This is the 'attach' bit of AUTOEXEC.NET. I can't see where the parameter
  536. following the interface name is used, but the code suggests it is the
  537. maximum length of the transmit queue. The next param is the MTU.
  538.  
  539.  
  540. #
  541. attach packet 61 ax1 5 256        Radio Port 1
  542. attach packet 62 ax2 5 256        Radio Port 2
  543. attach packet 63 node 5 236        Loopback link to the switch
  544. #
  545.  
  546.  
  547. This is a new facility, and there is very little local IP activity for
  548. me to try it with. Any feedback would be most welcome, both on problems
  549. and suggestions on how best to set up the system.
  550.  
  551.  
  552.